cmake_minimum_required(VERSION 3.22)

project(r-someip VERSION 0.0.1)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

if (NOT DEFINED CMAKE_INSTALL_PREFIX)
    set(CMAKE_INSTALL_PREFIX "/usr")
endif()

if (NOT DEFINED R_SOCKET_INSTALL_LIB_DIR)
    set(R_SOCKET_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib64)
endif()

if (NOT DEFINED R_SOCKET_INSTALL_BIN_DIR)
    set(R_SOCKET_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/bin)
endif()

if (NOT DEFINED R_SOCKET_INSTALL_INC_DIR)
    set(R_SOCKET_INSTALL_INC_DIR ${CMAKE_INSTALL_PREFIX}/include)
endif()

set(R_SOCKET_PROXY_TARGET "r_socket_proxy")

add_subdirectory(${PROJECT_SOURCE_DIR}/implement/socket_proxy)

if (BUILD_TEST)
    add_subdirectory(${PROJECT_SOURCE_DIR}/test/socket_proxy_apps)
endif()
